How to delete web modules from virtual server in glass fish 3.1.2 - glassfish-3

I developed a web service. When i want to publish it on the server, then i get the following error
cannot Deploy TemperatureConverterServiceClientEAR
Deployment Error for module: TemperatureConverterServiceClientEAR: Error occurred
during deployment: Exception while loading the app : java.lang.Exception: WEB0113:
Virtual server [server] already has a web module
[AndroidBackendAuthentication.war] loaded at [/AndroidBackendAuthentication];
therefore web module
[TemperatureConverterServiceClientEAR#AndroidBackendAuthentication.war] cannot be
loaded at this context path on this virtual server. . Please see server.log for
more details
I went to directory C:\glassfish3\glassfish\domains\domain1\eclipseApps and delete all the files. I also went to
Then i click on the server. In the default Web module option i have following entries
How can i delete these modules from here. Whenever i tried to deploy webservice i get this message. How can i get rid of this message? I also delete the deployed module from the Application option after which this default Web module option become empty. But then if i try to deploy any webservice , i get the error. Please help
Thank you.

you shold undeploy the old web moudle
use the flow command to do this:
./bin/asadmin --port $port undeploy $app
$port means the "glassfish admin port". when you use start-domain you will see it
$app means the name of the old moudle you want to undeploy, you can use ./bin/asadmin --port $port list-applications commands to see all the web moudles had been deployed to this domain

I had the same problem and I found exist:
go into server/glass fish server (node)/application. And there You've got app blocked Your work. Just delete it, and ready :)

I was having the same problem. I was able to fix it by restarting glassfish. Go to services->Servers. Right click on glassfish and restart. Hope that helps.

Related

Use fs.unlinkSync with full path to remove file in project, it works on local server, but it gives error(5xx) after deployed to azure web app

I have an app that builds with Vuejs and Nodejs server.
I created a folder called 'uploads' in the project to temporary store all of the files that was uploaded to the server.
When the uploaded action is ready, I have a restAPI to clean the file in folder 'uploads' with the given absolute path. I use fs.unlinkSync to remove the temp file in the rest api.
Everything works perfectly on local, but after I deploy to azure web app, whenever the restapi for removing a file is triggered, it gives me 502 bad gateway error.
I have checked a lot of information, still can not solve this problem. Wonder if anyone have experience with it?
Log from Azure Web App
Failed to forward request to application. Encountered a System.Threading.Tasks.TaskCanceledException exception after 300196.724ms with message: The operation was canceled.. Check application logs to verify the application is properly handling HTTP traffic.
Try to use fs.unlink(path, callback), then you can log more error details in callback function.
Suggestion
You also can use try..catch... to get more exception message. Get error details should be useful to you to solve the problem.
About Log from Azure Web App, I'm not sure how you use it, or use the default. The exception caught by the code may be more helpful to you.
If you use linux platform, you can use remote debugging.
Azure Remote Debugging for Node.js

Issue in deploying Grails 3.1.9 application in WebSphere 8.5.5.8

I am trying to deploy an app developed in Grails 3.1.9 in WebSphere 8.5.5.8
I've generated .war file and installed successfully but, when I'm trying to access through link http://localhost/MyAPP/ following error appears:
Error 404: SRVE0190E: File not found: {0}
I am able to access the static resources in the app as below..
http://localhost/MyAPP/assets/apple-touch-icon.png
Pl. help at the earliest. Thanks in advance.
In WebSphere the application server port is 9080. So try accessing http://localhost:9080/MyAPP/ (you may not have deployed on web server)
Check SystemOut.log for specific issue. If it is related to data source then check the JDBC connection URL. If you are getting any NoClassDefFoundError, then add the corresponding jar in class path. In case of any resource loading issue, check the JDK version of your code and WebSphere.

Trying to run meteor up mup setup

It appears mup setup can't run without a mup.json file. But, it appears the mup.json file is primarily used for mup deploy. Reason I ask is I'm trying to execute mup setup on the host server and it fails without the server credentials but considering that I'm already logged onto the server executing the setup I don't understand why the mup.json is being required in the first place? I'm not deploying an application so none of the application-specific settings would apply, right? If I don't have a mup.json on the server then mup setup throws an error that the mup.json file does not exist. It didn't seem really clear on the meteor up web site. Thanks!
You should run Meteor Up from your local machine as that's what it's designed for. I wrote about how to deploy with meteor up a while back and that should help you.
In a nutshell I believe you're thinking about this the wrong way. With mup, meteor deploy and soon galaxy deploy, you no longer need to "upload" your files and then go and manage them from the server. Instead your files stay local, you deploy (which will upload them) and deployment sets up your server and file structure.
Misunderstanding on my part. mup setup is something you run on your remote machine, not the host machine.

HTTP Error 503, the service is unavailable

I'm really new to setting up web servers in general. I've got IIS 8 on Windows 8, and I'm trying to set up a little site locally, while doing some development. In IIS I choose Add Site, give a name, points to a location where I have a index.html file (I've tried different locations, latest in a c:\inetpub\wwwroot\test -folder) and otherwise use all default settings. However, when I try to browse to localhost I get
HTTP Error 503. The service is unavailable.
I've verified the pool is started, and I've given IIS_IUSRS Full Control on the target folder
I've search around but not found anything that solved my issue, and there's nothing helpfull in the EventLog or in the C:\Windows\System32\LogFiles\HTTPERR folder
Could anyone tell me what's wrong?
It could be that the user identity is outdated, especially if you've tried starting a stopped app pool and the next request again fails.
In IIS, go to the Application Pools under the Server, then find the correct Application Pool for your web site, and click on it. On the Advanced Settings menu to the right, select Identity and change it and enter new user and password. Click on your Application Pool again, and select Recycle to restart it.
You can also try looking at the error message in Event Viewer, under Windows Logs, Application, Details tab.
Other answers are fine. But in my case, I was working on a Windows box that already was running some old IIS, IISExpress or any other web site. What happened is urls ACLs where reserved somehow in the system. So, you might want to check this.
Here is the console command to dump all URL acls:
netsh http show urlacl
Check what's returned here, and if anything matches the url you are testing, here is the command to delete one URL acl (for example):
netsh http delete urlacl url=http://localhost:2018/
(beware to carefully note what you do here in case it was not related to the original problem)
In my case the problem was the DefaultAppPool. I changed the "Load User Profile" to false and now it works. However, I don't know if there are side effects to this.
Further reading on setting the Load User Profile option: What exactly happens when I set LoadUserProfile of IIS pool?
Check your application's respective Application Framework Pool - it could be stopped. If it is, start it and check again.
If you're still experiencing issues you can also check out Event Viewer to find the cause of that error in order to troubleshoot more.
If the app pool is running under some specific user identity, then go to the advanced settings and update the username and password again to ensure they are correct.
If the app pool immediately stops after you start it and your event log shows:
The worker process for application pool 'APP_POOL_NAME' encountered an
error 'Cannot read configuration file ' trying to read configuration
data from file '\?\', line number '0'. The data field contains
the error code.
... you may experiencing a bug that was apparently introduced in the Windows 10 Fall Creators Update and/or .Net Framework v4.7.1. It can be resolved via the following workaround steps, which are from this answer to the related question Cannot read configuration file ' trying to read configuration data from file '\\?\<EMPTY>', line number '0'.
Go to the drive your IIS is installed on, eg. C:\inetpub\temp\appPools\
Delete the directory (or virtual directory) with the same name as your app pool.
Recycle/Start your app pool again.
I have reported this bug to Microsoft by creating the following issue on the dotnet GitHub repo: After installing 4.7.1, IIS AppPool stops with "Cannot read configuration file".
EDIT
Microsoft responded that this is a known issue with the Windows setup process for the Fall Creators Update and was documented in KB 4050891, Web applications return HTTP Error 503 and WAS event 5189 on Windows 10 Version 1709 (Fall Creators Update). That article provides the following workaround procedure, which is similar to the one above. However, note that it will recycle all app pools regardless of whether they are affected by the issue.
Open a Windows PowerShell window by using the Run as administrator
option.
Run the following commands:
Stop-Service -Force WAS
Remove-Item -Recurse -Force C:\inetpub\temp\appPools\*
Start-Service W3SVC
Or if none of the current solutions work, look in your website's directory for a file called app_offline.htm. That basically tells IIS that your site is unavailable and to show this page instead.
To fix it, either delete it or rename it to app_offline.htm.bak.
In my case, I added it while showing a colleague how to use that to prevent traffic to the site temporarily and then forgot that I did that on my box. Sigh.
Start by looking in Event Viewer, either under the System or the Application log.
In my case the problem was that no worker process could be started for the App Pool because its configuration file couldn't be read - I had included an extra '.' at the end of its name.
I resolved this issue by removing a URL reservation that matched my app directory in IIS. I had a similar (definitely not the same) issue as outlined in this article:
A Not So Common Root Cause for 503 Service Unavailable
It is possible that your domain requires the account used for running the AppPool to have batch logon rights. In which case you will see this same error message. The way you can tell if that is the case, is by looking at the System events in the Event Viewer. There should be an event saying that the account being used with the App Pool has either 'the wrong password or does not have batch logon rights'.
This is why developers quite often use IIS Express on their development machine, since it by passes the batch logon rights issue.
I ran into the same issue, but it was an issue with the actual site settings in IIS.
Select Advanced Settings... for your site/application and then look at the Enabled Protocols value. For whatever reson the value was blank for my site and caused the following error:
HTTP Error 503. The service is unavailable.
The fix was to add in http and select OK. The site was then functional again.
For my case, My Default Application Pool was offline.
To troubleshoot the problem, I checked the IIS logs located in C:\Windows\System32\LogFile\HTTPERR. Scroll down to the most recent error logs, this will show you problems with IIS if any.
My Error was "503 1 AppOffline DefaultPool"
Solution
Open IIS Manager
Click on Application Pools, this lists all application pool to your right.
Check if the application pools hosting your api or site has a stop sign on it. If so, right click the application pool and click start.
Try again to access your service from the client
Check Event Viewer - Windows - Application. If there is a red Error line made from IIS-W3SVC-WP and the message is like The Module DLL C:\Windows\system32\inetsrv\rewrite.dll failed to load. The data is the error. then you are missing some Windows Setup features.
In Windows Server 2012 go to Server Manager, Add Roles and Features, Web Server (IIS) and add the matching feature. Usually, most of the Application Development section is installed. Here is a complete list of IIS features and their associated DLL to help in diagnosis.
After going through a few iterations of that I ended on the error message above regarding "rewrite.dll". This led to a direct download and install of Microsoft URL Rewrite tool. Finally all websites came to life.
Our server ran out of disk space on Sunday afternoon which led to an application suddenly failing and returning HTTP error 502. The logs were empty so it had to be something that was occurring before IIS even did anything.
A swift look at the event viewer(WIN+R > eventvwr) exposed the issue.
It's a good idea to filter out the output of the System and Application windows to WAS since it can get pretty verbose in there.
The application depended on another one which was disabled. Therefore keep in mind an application can go down indirectly if one of it's dependent processes has gone down. We simply re-enabled the .NET application pool and our other application started running normally again.
If you have IIS URL Rewriting installed it could be to do with that. I suffered issues after a Windows 10 Update.
This StackOverflow post helped me.
Go to Windows Control Panel > Programs and Features > IIS URL Rewrite Module 2 > Repair.
i see this error after install url rewrite module i try to install previous version of it from:
https://www.microsoft.com/en-us/download/details.aspx?id=7435
it fixed my error
In my case, the problem was that another application was using the port that I had bound to my web site.
I found it by running the following command from a command line, which lists all of the listening ports and the executable involved:
netstat -b
If you have McAfee HIPS and if you see the following error in event viewer application log:
The Module DLL C:\Windows\System32\inetsrv\HipIISEngineStub.dll failed to load.
The data is the error.
Then this workaround on McAfee.com resolved the issue in my case.
Quote from the page:
Click Start, Run, type explorer and click OK.
Navigate to: %windir%\system32\inetsrv\config
Open the file applicationHost.config as Administrator for editing in Notepad.
Edit the <globalModules> section and remove the following line:
<add name="MfeEngine" image="%windir%\System32\inetsrv\HipIISEngineStub.dll" />
Edit the <modules> section and remove the following line:
<add name="MfeEngine" />
After you have finished editing the applicationHost.config file, save the file, then restart the IIS server using iisreset or by restarting the system.
Actually, in my case https://localhost was working, but http://localhost gave a HTTP 503 Internal server error. Changing the Binding of Default Web Site in IIS to use the hostname localhost instead of a blank host name.
tname for http binding
This could also happen if any recent installs or updates happened with .NET framework and/or ASP.NET. If you are unsure of what happened recently and if all your apps use ASP.NET version 4, you can try reset them by running the following commands in command prompt in administrator mode.
cd C:\Windows\Microsoft.NET\Framework64\v4.0.30319
aspnet_regiis -i
This makes sure to install or reinstall ASP.NET 4 and updates existing applications to use ASP.NET 4 version of the app pool. It updates both IIS Classic and Integrated mode handlers and script mappings in the IIS metabase. It also recreates ASP.NET v4.0 and ASP.NET v4.0 Classic app pools, and sets .NET framework 4 to DefaultAppPool and Classic .NET app pools.
I changed the port from 80 to 8080, that's why this error occur. I write localhost/ in search bar then this error occur. My problem is resolved by writing localhost:8080/ in the search then local host open.
This happened to me on a server on our intranet. After browsing through blog posts and Windows logs, it turned out that a few days before Christmas 2015 (related to a Windows Update?) my web site application pool wanted to create a config file in folder c:\inetpub\temp\appPools, but access to this folder was restricted. This caused the application pool to be disabled.
After adding Full control to Everyone on this temp folder, I restarted the Windows Process Activation Service and everything went online again.
If I'd been a little more elegant, it would probably had been enough to grant the AppPool user full control to the folder, but I never seem to remember how the app pool name and app pool user relates to eachother...
Same thing with IIS Express 10.0 after upgrading Windows 7 to Windows 10.
Solution: go to IIS and enable all disabled websites and reinstall ASP.NET Core.
Also check the address bar and make sure the page is in the right location.
This error can be returned instead of the 404 (Page not found). In my case, it was a bad link on the page that didn't have a subfolder included.
I was having this problem when cleaning up my IIS on dev machine, and I had somehow created a virtual folder for a subfolder of my actual development web that I couldn't clear and was creating conflicts.
To clear it I had to use
C:\Windows\System32\inetsrv\appcmd.exe list vdir
and then individually remove the problem virtual directories using
C:\Windows\System32\inetsrv\appcmd.exe delete app /app.name:"Default Web Site"/{name of virtual directory}
For me the solution is to change Enable 32-bit Applications to False
None of the answers worked for me. So I'd like to share what I found after hours of research..
Keep seeing this message from event logs: The Module DLL C:\Windows\system32\RpcProxy\RpcProxy.dll failed to load. The data is the error. Turns out that dll is 64bit and cannot be loaded into 32bit process.
You can also try the following.
Right-click on the site and 'Basic Settings...'
Click on 'Connect As...'
Click on Specific User and give the new credentials.
Now it should work.
In my case, I had to change my userPass of network because company policies. So, you need to edit your AppPool:
click on Application Pools. Select your pool, 'advanced Settings...' go to 'Process Model' click on 'Identity' and Click on Specific User and give the new credentials.
This might be because of number of connections to the database. I had such a situation and so, wrote a de-constructor and killed db open connection and it resolved.
I had the same problem and found it was caused by permission problems creating the user profile in C:\Users. I gave ApplicationPoolIdentity full permissions to the C:\Users folder, started the site and everything worked, the profile must have been created properly, and my site worked as it should. I then removed access to C:\Users from ApplicationPoolIdentity.
Site wont start on local using ApplicationPoolIdentity, only when using NetworkService: "HTTP Error 503. The service is unavailable."

MSDeploy.exe can connect as Administrator, but not any other Windows account

I'm integrating MSDeploy into my build process, and having problems authenticating. The following command works fine:
msdeploy -verb:sync -source:appHostConfig="KitchenPC",computerName=192.168.0.3,userName=Administrator,password=secret -dest:package=c:\DeployTest\KPC.zip
However, this does NOT work:
msdeploy -verb:sync -source:appHostConfig="KitchenPC",computerName=192.168.0.3,userName=kpcpublish,password=secret -dest:package=c:\DeployTest\KPC.zip
And yields the error:
Error Code: ERROR_USER_NOT_ADMIN
More Information: Connected to '192.168.0.11' using the Web Deployment Agent Service, but could not authorize. Make sure you are an administ
rator on '192.168.0.11'. Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_USER_NOT_ADMIN.
Error: The remote server returned an error: (401) Unauthorized.
Error count: 1.
I've followed the instructions in the link above, and any other docs I could find, which pretty much all say the same thing:
I created an account called kpcpublish
I added this account to a group called MSDepSvcUsers - Heck, I even added the account to Administrators
I right clicked on the site and selected Deploy->Configure Web Deploy Publishing and added kpcpublish to the list. It says the following:
.
Publish enabled for 'SERVER\kpcpublish' Granted 'SERVER\kpcpublish'
full control on 'C:\Website' Successfully created settings file
'C:\Users\Administrator\Desktop\SERVER_kpcpublish_KitchenPC.PublishSettings'
There must be some step I'm missing, but I just can't figure out what could be.
UPDATE:
Using the full HTTP path for the computerName property, I get the error:
Error Code: ERROR_DESTINATION_NOT_REACHABLE More Information: Could
not connect to the remote computer ("192.168.0.3"). On the remote
computer, make sure that Web Deploy is installed and that the required
process ("Web Management Service") is started. Learn more at:
http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_DES
TINATION_NOT_REACHABLE. Error: Unable to connect to the remote server
Error: A connection attempt failed because the connected party did not
properly respond after a period of time, or established connection fa
iled because connected host has failed to respond 192.168.0.3:8192
Error count: 1.
I've checked and the Web Management Service is indeed running.
Another Update:
I've completely paved the system and set it up again from scratch. I've done nothing out of the ordinary, just installed the IIS role and made sure to check "Management Service" under Management Tools, which is required for WMSVC to run. I then installed Web PI, and installed "Recommended Configuration for Hosting Providers", which will install Web Deploy 3.0. However, I did notice there was an error while installing this (I believe I got this error the last time as well). It looks like:
I've also attached the log files here.
I then tried to install Web Deploy 3.0 manually, however it says it's already installed. Next, I downloaded the MSI directly from http://www.iis.net/download/webdeploy and ran it in "Repair" mode. That seems to have worked. I also noticed that the WMSVC service is up and running. So this looks good.
Still, MSDeploy will not connect. I thought it might be some sort of firewall issue, so I ran it locally. I've tried using both HTTPS and HTTP to connect. HTTPS gives me an error, HTTP just times out after 2-3 minutes.
HTTPS:
msdeploy -verb:sync -source:appHostConfig="Default Web Site",computerName=https://STAGING:8172/msdeploy.axd,userName=Administrator,password=Khorf123 -dest:package=c:\DeleteMe.zip
Info: Using ID 'f3a54096-adc4-4f54-9e4f-ad8fde12edb6' for connections to the remote server.
Error Code: ERROR_CERTIFICATE_VALIDATION_FAILED
More Information: Connected to the remote computer ("staging") using the specified process ("Web Management Service"), but could not verify the server's certifi
cate. If you trust the server, connect again and allow untrusted certificates.
Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_CERTIFICATE_VALIDATION_FAILED.
Error: The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel.
Error: The remote certificate is invalid according to the validation procedure.
Error count: 1.
HTTP:
msdeploy -verb:sync -source:appHostConfig="Default Web Site",computerName=http://STAGING:8172/msdeploy.axd,userName=Administrator,password=Khorf123 -dest:package=c:\DeleteMe.zip
Info: Using ID 'ebee66f0-08e5-4d9d-98ea-0c2e59784895' for connections to the remote server.
Error: Could not complete the request to remote agent URL 'http://staging:8172/msdeploy.axd'.
Error: The operation has timed out
Error count: 1.
(Updated 2016-03-07 - NOTE: non-Administrator deployments also require ?site=IIS_SITE_NAME after msdeploy.axd, otherwise the connection is treated as global and requires Administrator access)
Not sure how missed this originally, but your problem is the computerName parameter. Non-administrator deployments are only supported when using WMSVC, for which you need to specify the full URL.
Try the following
msdeploy -verb:sync ^
-source:appHostConfig="KitchenPC",computerName=https://192.168.0.3:8172/MsDeploy.axd,userName=kpcpublish,password=secret,authType=Basic ^
-dest:package=c:\DeployTest\KPC.zip
From the docs:
The computer name will be translated to the default Web Deploy URL. For example, computerName=Server1 will become http://Server1/MsDeployAgentService. If the remote service is running with a custom port or URL, you must specify the full URL
And from the install instructions:
The MSI will not install the Web Management Service handler component if the Web Management Service is not installed; the handler component is necessary for non-administrator deployments
(I couldn't find a more explicit canonical source that describes WMSVC as a requirement for non-admin deployments)
Figured It Out!
So, it seems that (at least by default), WMSVC only listens on HTTPS, and HTTP will just time out. However, since my certificate was self-signed, I had to use the -allowUntrusted command line option.
That was almost enough. I also had to specify authType=Basic like Richard originally suggested. So, to put it all together, this is the MSDeploy command line that will actually work:
msdeploy -verb:sync -source:appHostConfig="Default Web Site",computerName=https://192.168.0.3:8172/msdeploy.axd,authType=Basic,userName=Publish,password=secret -dest:package=c:\DeployTest\KPC.zip -allowUntrusted
After configuring Web Deploy my server as follows. I continued to get HTTP 404 connection failures. In may what worked for me was the following additional efforts...
Uninstall all previous version of Web Deploy that existed. I was not even aware they existed; however, previous versions appear to conflict with completing a connection to the latest Web Deploy service. Newer version don't uninstall their predecessors. In the last part, I was getting HTTP 401.7 - File Extension Denied.
For good measure, performed a repair of the current version of Web Deploy, currently Microsoft Web Deploy 3.6
For good measure, recreate and import my Visual Studio 2013 deployment profile...
recreate the publish settings file using the Configure Web Deploy Publishing dialogue available from the Deploy context menu option of the target website in IIS Manager's Connections panel. (Note, the publish settings file will be recreated when you press Setup as the file whose full path is specified in the dialogue entry, Specify a location to save the publish settings file)
Copy or otherwise make the publish settings file available to Visual Studio and selecting Publish from your project's context menu, create a Visual Studio publish profile by importing the publish settings file.
Try restarting the wmsvc service on the target machine
As alluded to above, make sure that you are connecting over HTTPS. If you are attempting to connect as Admin, but not using SSL, you get the following error:
Error Code: ERROR_USER_NOT_ADMIN
More Information: Connected to 'host' using the Web Deployment Agent Service, but could not authorize. Make sure you are an administrator on 'host'.
(Where 'host' is your server name)
For me the problem was that my password expired... I've noticed it when loging out and then tried to login back trhough remote desktop.

Resources