46

I have NetBeans IDE installed on a Windows 7 64-bit machine. Obviously, NetBeans comes with the GlassFish server.

I am currently having problems with a project and would like to check the server logs. Where are these stored please?

Charles
  • 50,010
  • 13
  • 100
  • 141
Matthew
  • 4,347
  • 18
  • 65
  • 92

3 Answers3

57

In general the logs are in /YOUR_GLASSFISH_INSTALL/glassfish/domains/domain1/logs/.

In NetBeans go to the "Services" tab open "Servers", right-click on your Glassfish instance and click "View Domain Server Log".

If this doesn't work right-click on the Glassfish instance and click "Properties", you can see the folder with the domains under "Domains folder". Go to this folder -> your-domain -> logs

If the server is already running you should see an Output tab in NetBeans which is named similar to GlassFish Server x.x.x

You can also use cat or tail -F on /YOUR_GLASSFISH_INSTALL/glassfish/domains/domain1/logs/server.log. If you are using a different domain then domain1 you have to adjust the path for that.

unwichtich
  • 13,511
  • 3
  • 50
  • 65
  • 2
    I've found that for the current version (8.1) you need to go into the "output" pane and inside the "GlassFish Server 4.1.1" tab to find your stack trace. – CSS Nov 26 '15 at 03:55
25

Locate the installation path of GlassFish. Then move to domains/domain-dir/logs/ and you'll find there the log files. If you have created the domain with NetBeans, the domain-dir is most probably called domain1.

See this link for the official GlassFish documentation about logging.

perissf
  • 15,606
  • 14
  • 76
  • 117
  • I use NetBeans 8.2: in the GlassFish Server properties there are two paths: the **Installation path** and the **Domain Folder**. They have similar structure, but in my case, the log file was in the **Domain Folder** (_C:\Users\User\AppData\Roaming\NetBeans\8.0.2\config\GF_4.1\domain1\logs_) – T30 Jun 26 '15 at 10:57
21
tail -f /path/to/glassfish/domains/YOURDOMAIN/logs/server.log

You can also upload log from admin console : http://yoururl:4848

enter image description here

Abdennour TOUMI
  • 76,783
  • 33
  • 229
  • 231